﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.IO.IsolatedStorage;

namespace Norma43
{
    public partial class PasswordLocal : PhoneApplicationPage
    {
        private IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings;
        public PasswordLocal()
        {
            InitializeComponent();
        }

        private void btnAcceptar_Click(object sender, System.Windows.RoutedEventArgs e)
        {
        	// TODO: Add event handler implementation here.
            if (appSettings["Password"].ToString() == Contrassenya.Password) NavigationService.Navigate(new Uri("/resumTotal.xaml", UriKind.Relative));
            else MessageBox.Show("La contrassenya no és correcte.", "", MessageBoxButton.OK);
        }

        private void LayoutRoot_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
        	// TODO: Add event handler implementation here.
			Text.Text = appSettings["Password"].ToString();
        }
    }
}
